<!DOCTYPE html>
<html>
<head>
	<title>你</title>
</head>
	<!-- <img src="./textures/2.jpg"> -->
<script type="text/javascript" src="./lib/cuon-matrix.js"></script>
<script type="text/javascript" src="./lib/cuon-utils.js"></script>
<script type="text/javascript" src="./lib/webgl-debug.js"></script>
<script type="text/javascript" src="./lib/webgl-utils.js"></script>
<script type="text/javascript">
var VSHADER_SCURCE = 
'void main(){\n'+
'  gl_Position = vec4(0.0, 0.0, 0.0,1);\n'+
'  gl_PointSize = 10.0;\n'+
'}\n';

var FSHADER_SCURCE =
'void main(){\n'+
' gl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\n'+
'}\n';


function start(){
    var canvas= document.getElementById("webgl");
    var gl = getWebGLContext(canvas);
    if (!gl) {
      alert("gl 初始化失败！")
      return
    }
    if(!initShaders(gl,VSHADER_SCURCE,FSHADER_SCURCE)){
      alert("gl 着色器初始化失败")
      return
    } 
   
    gl.clearColor(0.0,1.0,0.0,0.5);
    gl.clear(gl.COLOR_BUFFER_BIT)
    gl.drawArrays(gl.POINTS,0,1)
   
  }
</script>
<body onload="start()">
	<canvas id="webgl" width="400" height="400"></canvas>
</body>
</html>